package com.fansl.allround.common.security.exception;

import com.fansl.allround.common.security.component.AllroundAuth2ExceptionSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.http.HttpStatus;

/**
 * @author fansl
 * @Description: TODO
 * @date 2019/8/9 16:00
 */
@JsonSerialize(using = AllroundAuth2ExceptionSerializer.class)
public class ServerErrorException extends AllroundAuth2Exception {
    public ServerErrorException(String msg, Throwable t) {
        super(msg,t);
    }
    public ServerErrorException(String msg) {
        super(msg);
    }

    @Override
    public String getOAuth2ErrorCode() {
        return "server_error";
    }

    @Override
    public int getHttpErrorCode() {
        return HttpStatus.INTERNAL_SERVER_ERROR.value();
    }
}
